Answer:

Looking in the table, you see that COLOR 2 picks Green to draw with. The program will draw four green spots in a row close to the upper left of the screen.

Several Colors

With a real graphics screens you have many more columns and rows than in the above picture. With screen 12 you have graph paper that is 640 columns across and 480 rows down. Computer graphics is somewhat like "paint-by-numbers" sets. With computer graphics each spot to color is a rectangle (called a pixel) and they are all the same size. If you set each and every pixel to the color you wanted, you would have a nice digital picture. This would be a great deal of work. You will soon learn of easier ways to draw pictures.

Here is a program that sets six pixels; the first three to green (as in the previous program) and the last three to red:

' Setting pixels to color 2 (Green)
' and color 4 (Red)
'
SCREEN 12
'
' Change the pen color to Green
'
COLOR 2
PSET ( 1, 3 )   ' set column 1 row 3
PSET ( 3, 3 )   ' set column 3 row 3
PSET ( 5, 3 )   ' set column 5 row 3
PSET ( 7, 3 )   ' set column 7 row 3
'
' Change the pen color to Red
'
COLOR 4
PSET ( 1, 5 )   ' set column 1 row 5
PSET ( 3, 5 )   ' set column 3 row 5
PSET ( 5, 5 )   ' set column 5 row 5
PSET ( 7, 5 )   ' set column 7 row 5
'
END

People speak of changing the pen color when changing the color being used by the graphics system. The comments are used to explain what is going on.

QUESTION 10:

Describe the picture painted by the above program.